<?php 
	if(count($list)>0){
		foreach ($list as $row){ 
?>
<div id="subsidi2">
<br/>
<input type="text" value="Sisa <?php echo $row->nama_subsidi;?> sebesar <?php echo formatRupiah($row->sisa);?>" disabled class="form-control form-elba input-sm"/>
<input type="hidden" id="id_a_subsidi" value="<?php echo $id_a_subsidi = $row->id_a_subsidi;?>"/>
<br/>
<input type="hidden" id="sisa_subsidi" value="<?php echo $row->sisa;?>"/>
<input type="text" id="besar_subsidi" class="form-control form-elba input-sm" placeholder="Inputkan besar subsidi @ tholabah lalu tekan enter"/>
<br/>
</div>
<div id="rincian" style="display:none;">
	<div class="alert alert-success">
		<?php echo $row->nama_subsidi;?> sebesar <span class="t-merah" id="sub"></span> @tholabah, dengan sisa subsidi <span class="t-merah" id="sisa_sub"></span>
		 <button type="button" title="Atur ulang subsidi" class="close" id="pilihLagi">&times;</button>
	</div>
	<br/>
	<?php 
		echo form_open('b_sub_non_sy/save', array('id' => 'SaveBagiSubNonSy')); 
	?>
	<input type="hidden" name="id_a_subsidi" value="<?php echo $id_a_subsidi;?>"/>
	<input type="hidden" id="besar_sub" name="besar_subsidi"/>
	<input type="hidden" id="id_a_non_sy2"/>
	<table class="table table-borderLuar table-hover table-condensed diklik">
	<?php 
		if(count($list_th)>0){
			$i = 1; 
			foreach ($list_th as $row_th) {
	?>
		<tr class="kursor">
			<td class="col-sm-1">
				<input type="checkbox" id="id_b_non_sy" name="id_b_non_sy[]" value="<?php echo $row_th->id_b_non_sy; ?>"> <?php echo $row_th->id_m_tholabah; ?>
			</td>
			<td class="col-sm-5">
				<?php echo $row_th->nama_lengkap; ?>			
			</td>
			<td class="col-sm-6">
				<?php echo substr($row_th->alamat,0,35);?>...
				<span class="pull-right"><?php if($row_th->jk=='Laki-laki'){echo "L";}else{echo "P";}; ?></span>
			</td>
		</tr>
	<?php
			}
		}else{
	?>
	<td>Tidak ada data tholabah</td>
	<?php
		}
	?>
	</table>

	<span id="loadingSave" style="display:none;">Sedang memproses..</span>
	<span id="errorSave" style="display:none;color:red;">Ma'af, tholabah tidak dapat ditambahkan</span>

	<span class="pull-right">
		<button type="submit" id="saveButton" disabled class="btn btn-xs tmb-utama <?php if(count($list_th)<1){echo "sembunyi";}?>"> Simpan</button> 
	</span>
	<?php
		echo form_close();
	?>

</div>
<?php
		}
	}else{
?>
<br/>
Silahkan pilih subsidi
<?php
	}
?>